import Login from './views/Login.vue'
import TenantRegister from "./views/sysmanage/tenantRegister";
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Main from './views/Main.vue'
import Table from './views/nav1/Table.vue'
import Form from './views/nav1/Form.vue'
import user from './views/nav1/user.vue'
import Page4 from './views/nav2/Page4.vue'
import Page5 from './views/nav2/Page5.vue'
import Page6 from './views/nav3/Page6.vue'
import echarts from './views/charts/echarts.vue'
//================组织机构管理=================//
import Department from "./views/org/Department";
import Employee from "./views/org/Employee";
import Shop from "./views/org/Shop";
//================组织机构管理=================//

//================车辆模块=================//
import CarType from "./views/car/CarType";
import Car from "./views/car/Car";
//================车辆模块=================//

//================系统管理=================//
import Config from "./views/sysmanage/Config";
import TenantType from "./views/sysmanage/TenantType";
import Tenant from "./views/sysmanage/Tenant";
import Dictionary from "./views/sysmanage/Dictionary";
import DictionaryItem from "./views/sysmanage/DictionaryItem";
//================系统管理=================//

//================产品模块===================
import Product from "./views/prod/Product";
import ProductType from "./views/prod/ProductType";
//================产品模块===================


//================营销模块===================
import Activity from "./views/market/Activity";
import ActivityRemark from "./views/market/ActivityRemark";
import Clue from "./views/market/Clue";
import ClueRemark from "./views/market/ClueRemark";
import ClueActivity from "./views/market/ClueActivity";
import Business from "./views/market/Business";
//================营销模块===================

//================订单模块===================
import Order from "./views/order/Order";
import Contract from "./views/order/Contract";
import ContractRemark from "./views/order/ContractRemark";
import OrderActivity from "./views/order/OrderActivity";
//================订单模块===================

//================售后模块===================
import Customer from "./views/aftermarket/Customer";
import Guarantee from "./views/aftermarket/Guarantee";
//================售后模块===================


//================财务模块===================
import Deposit from "./views/finance/Deposit";
import Receivables from "./views/finance/Receivables";
//================财务模块===================

let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/tenantRegister',
        component: TenantRegister,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        path: '/',
        component: Home,
        name: 'Charts',
        iconCls: 'fa fa-bar-chart',
        leaf:true,  // 设置leaf=true,说明该节点是叶子节点,那么它下面就不会再有子菜单了
        children: [
            { path: '/echarts', component: echarts, name: '首页' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '系统中心',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/tenantType', component: TenantType, name: '租户类型'},
            { path: '/tenant', component: Tenant, name: '租户管理'},
            { path: '/meal', component: Department, name: '套餐管理'},
            { path: '/department', component: Department, name: '部门管理'},
            { path: '/employee', component: Department, name: '员工管理'},
            { path: '/config', component: Employee, name: '系统配置' }
        ]
    },
    // {
    //     path: '/',
    //     component: Home,
    //     name: '车辆模块',
    //     iconCls: 'el-icon-message',//图标样式class
    //     children: [
    //         { path: '/carType', component: CarType, name: '车辆类型'},
    //         { path: '/car', component: Car, name: '车辆管理' },
    //         { path: '/shop', component: Shop, name: '店铺管理' },
    //     ]
    // },
    // {
    //     path: '/',
    //     component: Home,
    //     name: '产品模块',
    //     iconCls: 'fa fa-address-card',
    //     //leaf: true,//只有一个节点
    //     children: [
    //         { path: '/product', component: Product, name: '产品管理' },
    //         { path: '/productType', component: ProductType, name: '产品类型' }
    //     ]
    // },
    // {
    //     path: '/',
    //     component: Home,
    //     name: '营销模块',
    //     iconCls: 'fa fa-address-card',
    //     //leaf: true,//只有一个节点
    //     children: [
    //         { path: '/activity', component: Activity, name: '营销活动' },
    //         { path: '/activityRemark', component: ActivityRemark, name: '营销活动备注' },
    //         { path: '/clue', component: Clue, name: '线索管理' },
    //         { path: '/clueRemark', component: ClueRemark, name: '线索备注' },
    //         { path: '/clueActivity', component: ClueActivity, name: '线索活动' },
    //         { path: '/business', component: Business, name: '商机管理' },
    //     ]
    // },
    // {
    //     path: '/',
    //     component: Home,
    //     name: '订单模块',
    //     iconCls: 'fa fa-address-card',
    //     //leaf: true,//只有一个节点
    //     children: [
    //         { path: '/order', component: Order, name: '订单列表' },
    //         { path: '/contract', component: Contract, name: '合同列表' },
    //         { path: '/contractRemark', component: ContractRemark, name: '合同备注' },
    //         { path: '/orderActivity', component: OrderActivity, name: '订单活动' },
    //     ]
    // },
    // {
    //     path: '/',
    //     component: Home,
    //     name: '售后模块',
    //     iconCls: 'el-icon-message',//图标样式class
    //     children: [
    //         { path: '/customer', component: Customer, name: '客户列表'},
    //         { path: '/guarantee', component: Guarantee, name: '保修单列表' },
    //     ]
    // },
    // {
    //     path: '/',
    //     component: Home,
    //     name: '财务模块',
    //     iconCls: 'el-icon-message',//图标样式class
    //     children: [
    //         { path: '/deposit', component: Deposit, name: '定金列表'},
    //         { path: '/receivables', component: Receivables, name: '应收款列表' },
    //         { path: '/receivablesitem', component: Receivables, name: '应收款明细' },
    //     ]
    // },
    {
        path: '/',
        component: Home,
        name: '授权中心',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/role', component: Deposit, name: '角色管理'},
            { path: '/permission', component: Receivables, name: '权限管理' },
            { path: '/menu', component: Receivables, name: '菜单管理' },
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;